<?php
session_start();
if ($_SESSION['admin']!="OK")
{
   echo "<script language='javascript'>alert('Please log in first!');window.location.href='login.php';</script>";
   exit;
}
include("config.php");
$conn=mysql_connect($host,$user,$password);
mysql_select_db($db);
mysql_query("set names GB2312");
 mysql_query("update vote_choice set num=0");
 mysql_query("delete from vote_ip");
 mysql_query("delete from vote_opinion");
 echo "<script language='javascript'>alert('The result has been cleared');history.go(-1);</script>";
?>
